package com.gujiangbo;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @Author: gujiangbo.co
 * @Contact: 646832012@qq.com
 * @Date: 2022/5/1 21:17
 * @Version: 1.0
 * @Description:
 */
@SpringBootApplication
public class ApplicationRun extends SpringBootServletInitializer implements CommandLineRunner {

    private static final Log debugLog = LogFactory.getLog(ApplicationRun.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ApplicationRun.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(ApplicationRun.class, args);
    }

    @Override
    public void run(String... args) {
        debugLog.info("========== data ApplicationRun started info  ! ===============");
        debugLog.debug("========= data ApplicationRun started debug ! ===============");
        debugLog.error("========= data ApplicationRun started error ! ===============");
    }
}